home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global gNumberOfMainButtons, gCentersOfMainButtons, gMagicOffsetsOfMainButtons, gCastMemsOfMainButtons, gAniHasBeenViewed, gRadiusOfMainButton, gMagicH1, gMagicH2, gMagicV1, gMagicV2, gAnisForMainButtons, gNumberOfSmallButtons, gCentersOfSmallButtons, gMagicOffsetsOfSmallButtons, gCastMemsOfSmallButtons, gLabelsForSmallButtonActions, gRadiusOfSmallButtons, gIndexOfCurrentButton, gMouseDownInButton, gSmallButtonsOn, gIsMainButton, gIsSmallButton, gChannelForHighLights, gChannelForFreeFlash, gFreeFlashTimerBase, gNextLabel, gMovieToPlay, gCursorIsHand
- set gCursorIsHand to 0
- set gChannelForHighLights to 4
- set the puppet of sprite gChannelForHighLights to 1
- set the visible of sprite gChannelForHighLights to 0
- set gChannelForFreeFlash to 3
- set the puppet of sprite gChannelForFreeFlash to 1
- set the visible of sprite gChannelForFreeFlash to 0
- set gIndexOfCurrentButton to 0
- set gMouseDownInButton to 0
- set gIsMainButton to 0
- set gIsSmallButton to 0
- set gMovieToPlay to 0
- cursor(-1)
- set gFreeFlashTimerBase to the timer
- end
-
- on isPositionWithinMainButton hPos, vPos
- global gMagicH1, gMagicH2, gMagicV1, gMagicV2
- set indexOfButton to 0
- if hPos < gMagicH1 then
- if vPos < gMagicV1 then
- if isWithinThisMainButton(2, hPos, vPos) then
- set indexOfButton to 2
- end if
- else
- if isWithinThisMainButton(1, hPos, vPos) then
- set indexOfButton to 1
- end if
- end if
- else
- if vPos < gMagicV1 then
- if hPos < gMagicH2 then
- if isWithinThisMainButton(3, hPos, vPos) then
- set indexOfButton to 3
- end if
- else
- if isWithinThisMainButton(4, hPos, vPos) then
- set indexOfButton to 4
- end if
- end if
- else
- if isWithinThisMainButton(5, hPos, vPos) then
- set indexOfButton to 5
- end if
- end if
- end if
- return indexOfButton
- end
-
- on isWithinThisMainButton index, h, v
- global gCentersOfMainButtons, gRadiusOfMainButton
- set centerTemp to getAt(gCentersOfMainButtons, index)
- set hComp to getAt(centerTemp, 1) - h
- set vComp to getAt(centerTemp, 2) - v
- set r to sqrt((hComp * hComp) + (vComp * vComp)) < gRadiusOfMainButton
- return r
- end
-
- on isPositionWithinSmallButton hPos, vPos
- global gMagicH1, gMagicH2, gMagicV1, gMagicV2
- set indexOfButton to 0
- if vPos > gMagicV2 then
- if hPos < gMagicH1 then
- if isWithinThisSmallButton(1, hPos, vPos) then
- set indexOfButton to 1
- end if
- else
- if isWithinThisSmallButton(2, hPos, vPos) then
- set indexOfButton to 2
- end if
- end if
- end if
- return indexOfButton
- end
-
- on isWithinThisSmallButton index, h, v
- global gCentersOfSmallButtons, gRadiusOfSmallButtons
- set centerTemp to getAt(gCentersOfSmallButtons, index)
- set hComp to getAt(centerTemp, 1) - h
- set vComp to getAt(centerTemp, 2) - v
- set r to sqrt((hComp * hComp) + (vComp * vComp)) < gRadiusOfSmallButtons
- return r
- end
-